Integrand size = 27, antiderivative size = 121 \[ \int \frac {\text {sech}(c+d x) \tanh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {a \left (a^2-b^2\right ) \arctan (\sinh (c+d x))}{2 \left (a^2+b^2\right )^2 d}-\frac {a^2 b \log (\cosh (c+d x))}{\left (a^2+b^2\right )^2 d}+\frac {a^2 b \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2 d}-\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2916, 12, 1661, 815, 649, 209, 266} \[ \int \frac {\text {sech}(c+d x) \tanh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {a \left (a^2-b^2\right ) \arctan (\sinh (c+d x))}{2 d \left (a^2+b^2\right )^2}+\frac {a^2 b \log (a+b \sinh (c+d x))}{d \left (a^2+b^2\right )^2}-\frac {a^2 b \log (\cosh (c+d x))}{d \left (a^2+b^2\right )^2}-\frac {\text {sech}^2(c+d x) (a \sinh (c+d x)+b)}{2 d \left (a^2+b^2\right )} \]
[In]
[Out]
Rule 12
Rule 209
Rule 266
Rule 649
Rule 815
Rule 1661
Rule 2916
Rubi steps \begin{align*} \text {integral}& = \frac {b^3 \text {Subst}\left (\int \frac {x^2}{b^2 (a+x) \left (-b^2-x^2\right )^2} \, dx,x,b \sinh (c+d x)\right )}{d} \\ & = \frac {b \text {Subst}\left (\int \frac {x^2}{(a+x) \left (-b^2-x^2\right )^2} \, dx,x,b \sinh (c+d x)\right )}{d} \\ & = -\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d}-\frac {\text {Subst}\left (\int \frac {\frac {a^2 b^2}{a^2+b^2}-\frac {a b^2 x}{a^2+b^2}}{(a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (c+d x)\right )}{2 b d} \\ & = -\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d}-\frac {\text {Subst}\left (\int \left (-\frac {2 a^2 b^2}{\left (a^2+b^2\right )^2 (a+x)}-\frac {a b^2 \left (a^2-b^2-2 a x\right )}{\left (a^2+b^2\right )^2 \left (b^2+x^2\right )}\right ) \, dx,x,b \sinh (c+d x)\right )}{2 b d} \\ & = \frac {a^2 b \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2 d}-\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d}+\frac {(a b) \text {Subst}\left (\int \frac {a^2-b^2-2 a x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{2 \left (a^2+b^2\right )^2 d} \\ & = \frac {a^2 b \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2 d}-\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d}-\frac {\left (a^2 b\right ) \text {Subst}\left (\int \frac {x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right )^2 d}+\frac {\left (a b \left (a^2-b^2\right )\right ) \text {Subst}\left (\int \frac {1}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{2 \left (a^2+b^2\right )^2 d} \\ & = \frac {a \left (a^2-b^2\right ) \arctan (\sinh (c+d x))}{2 \left (a^2+b^2\right )^2 d}-\frac {a^2 b \log (\cosh (c+d x))}{\left (a^2+b^2\right )^2 d}+\frac {a^2 b \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2 d}-\frac {\text {sech}^2(c+d x) (b+a \sinh (c+d x))}{2 \left (a^2+b^2\right ) d} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.28 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.07 \[ \int \frac {\text {sech}(c+d x) \tanh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=-\frac {a \left (\left (a^2+b^2\right ) \arctan (\sinh (c+d x))+a ((i a+b) \log (i-\sinh (c+d x))+(-i a+b) \log (i+\sinh (c+d x))-2 b \log (a+b \sinh (c+d x)))\right )+b \left (a^2+b^2\right ) \text {sech}^2(c+d x)+a \left (a^2+b^2\right ) \text {sech}(c+d x) \tanh (c+d x)}{2 \left (a^2+b^2\right )^2 d} \]
[In]
[Out]
Time = 2.86 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.73
method | result | size |
derivativedivides | \(\frac {\frac {\frac {2 \left (\left (\frac {1}{2} a^{3}+\frac {1}{2} a \,b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (a^{2} b +b^{3}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-\frac {1}{2} a^{3}-\frac {1}{2} a \,b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+a \left (-a b \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )+\left (a^{2}-b^{2}\right ) \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {4 a^{2} b \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{4 a^{4}+8 a^{2} b^{2}+4 b^{4}}}{d}\) | \(209\) |
default | \(\frac {\frac {\frac {2 \left (\left (\frac {1}{2} a^{3}+\frac {1}{2} a \,b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (a^{2} b +b^{3}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-\frac {1}{2} a^{3}-\frac {1}{2} a \,b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+a \left (-a b \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )+\left (a^{2}-b^{2}\right ) \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {4 a^{2} b \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{4 a^{4}+8 a^{2} b^{2}+4 b^{4}}}{d}\) | \(209\) |
risch | \(\frac {2 a^{2} b \,d^{2} x}{a^{4} d^{2}+2 a^{2} b^{2} d^{2}+b^{4} d^{2}}+\frac {2 a^{2} b d c}{a^{4} d^{2}+2 a^{2} b^{2} d^{2}+b^{4} d^{2}}-\frac {2 a^{2} b x}{a^{4}+2 a^{2} b^{2}+b^{4}}-\frac {2 a^{2} b c}{d \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}-\frac {{\mathrm e}^{d x +c} \left (a \,{\mathrm e}^{2 d x +2 c}+2 b \,{\mathrm e}^{d x +c}-a \right )}{d \left (a^{2}+b^{2}\right ) \left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}-\frac {i a^{3} \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}+\frac {i a \ln \left ({\mathrm e}^{d x +c}-i\right ) b^{2}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}-\frac {a^{2} \ln \left ({\mathrm e}^{d x +c}-i\right ) b}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) a^{3}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}-\frac {i a \ln \left ({\mathrm e}^{d x +c}+i\right ) b^{2}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}-\frac {a^{2} \ln \left ({\mathrm e}^{d x +c}+i\right ) b}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}+\frac {a^{2} b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \,{\mathrm e}^{d x +c}}{b}-1\right )}{d \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}\) | \(451\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 917 vs. \(2 (117) = 234\).
Time = 0.28 (sec) , antiderivative size = 917, normalized size of antiderivative = 7.58 \[ \int \frac {\text {sech}(c+d x) \tanh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\text {sech}(c+d x) \tanh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\int \frac {\tanh ^{2}{\left (c + d x \right )} \operatorname {sech}{\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.81 \[ \int \frac {\text {sech}(c+d x) \tanh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {a^{2} b \log \left (-2 \, a e^{\left (-d x - c\right )} + b e^{\left (-2 \, d x - 2 \, c\right )} - b\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} - \frac {a^{2} b \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} - \frac {{\left (a^{3} - a b^{2}\right )} \arctan \left (e^{\left (-d x - c\right )}\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} - \frac {a e^{\left (-d x - c\right )} + 2 \, b e^{\left (-2 \, d x - 2 \, c\right )} - a e^{\left (-3 \, d x - 3 \, c\right )}}{{\left (a^{2} + b^{2} + 2 \, {\left (a^{2} + b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (a^{2} + b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )}\right )} d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 281 vs. \(2 (117) = 234\).
Time = 0.32 (sec) , antiderivative size = 281, normalized size of antiderivative = 2.32 \[ \int \frac {\text {sech}(c+d x) \tanh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {\frac {4 \, a^{2} b^{2} \log \left ({\left | b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 2 \, a \right |}\right )}{a^{4} b + 2 \, a^{2} b^{3} + b^{5}} - \frac {2 \, a^{2} b \log \left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )} e^{\left (-d x - c\right )}\right )\right )} {\left (a^{3} - a b^{2}\right )}}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {2 \, {\left (a^{2} b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} - 2 \, a^{3} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} - 2 \, a b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} - 4 \, b^{3}\right )}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} {\left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}}}{4 \, d} \]
[In]
[Out]
Time = 2.74 (sec) , antiderivative size = 339, normalized size of antiderivative = 2.80 \[ \int \frac {\text {sech}(c+d x) \tanh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {\frac {2\,b}{d\,\left (a^2+b^2\right )}+\frac {2\,a\,{\mathrm {e}}^{c+d\,x}}{d\,\left (a^2+b^2\right )}}{2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1}-\frac {\frac {2\,\left (a^2\,b+b^3\right )}{d\,{\left (a^2+b^2\right )}^2}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (a^3+a\,b^2\right )}{d\,{\left (a^2+b^2\right )}^2}}{{\mathrm {e}}^{2\,c+2\,d\,x}+1}-\frac {a\,\ln \left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )}{2\,\left (-1{}\mathrm {i}\,d\,a^2+2\,d\,a\,b+1{}\mathrm {i}\,d\,b^2\right )}+\frac {a^2\,b\,\ln \left (2\,a^7\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-a^2\,b^5-14\,a^4\,b^3-a^6\,b+a^6\,b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+2\,a^3\,b^4\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+28\,a^5\,b^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+a^2\,b^5\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+14\,a^4\,b^3\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\right )}{d\,a^4+2\,d\,a^2\,b^2+d\,b^4}-\frac {a\,\ln \left ({\mathrm {e}}^{c+d\,x}+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,\left (-d\,a^2+2{}\mathrm {i}\,d\,a\,b+d\,b^2\right )} \]
[In]
[Out]